package service.impl;

import java.sql.SQLException;
import java.util.List;



import bean.Room;
import dao.RoomDao;
import dao.impl.RoomDaoImpl;
import service.RoomService;

public class RoomServiceImpl implements RoomService {

	private RoomDao roomDao = new RoomDaoImpl();
	
	@Override
	public List<Room> queryHotRoom() {
				
		try {
			return roomDao.queryHotRoom();
		} catch (SQLException e) {
			e.printStackTrace();
		}
				
		return null;
	}

	@Override
	public Room queryRoomById(String rid) {
		try {
			return roomDao.queryByid(rid);
		} catch (SQLException e) {
			e.printStackTrace();
		}
		return null;
	}

	@Override
	public List<Room> queryByName(String rname) {

		try {
			return roomDao.queryByName(rname);
		} catch (SQLException e) {
			e.printStackTrace();
		}
				
		return null;
	}

	@Override
	public List<Room> queryByType(String tid) {
		try {
			return roomDao.queryByType(tid);
		} catch (SQLException e) {
			e.printStackTrace();
		}
		return null;
	}
	
	

}
